os_type=$(uname -s)
os_version=$(uname -r)
if ! command -v wget &> /dev/null; then
    echo "wget is required but not installed. Please install it."
    exit 1
fi

if ! command -v tar &> /dev/null; then
    echo "tar is required but not installed. Please install it."
    exit 1
fi

if [ "$(id -u)" -ne 0 ]; then
    echo "This script must be run as root."
    exit 1
fi



set -e

# 在关键步骤后添加错误检查
if [ $? -ne 0 ]; then
    echo "Error occurred during installation process. Exiting."
    exit 1
fi

